import http from '@/utils/http.js';
/**
 * 获取用户信息
 * @param {Object}
 * @returns
 */
export function getUserInfoApi() {
  return http({
    url: '/member/user/get',
    method: 'get'
  });
}

/**
 * 获取用户信息
 * @param {Object}  data
 * @returns
 */

export function avatarFileUploadApi(data) {
  return http({
    url: '/member/user/update-avatar',
    method: 'post',
    data
  });
}

/**
 * 编辑个人信息
 * @param {Object} data
 * @returns
 */
export function editUserInfoApi(data) {
  return http({
    url: '/member/user/update',
    method: 'post',
    data: data
  });
}

/**
 * 邮箱绑定
 * @param {Object} data
 * @returns
 */
export function bindEmailApi(data) {
  return http({
    url: '/member/user/emailBind',
    method: 'post',
    data: data
  });
}

/**
 * 手机号绑定
 * @param {Object} data
 * @returns
 */
export function bindPhoneApi(data) {
  return http({
    url: '/member/user/mobileBind',
    method: 'post',
    data: data
  });
}

/**
 * 微信绑定
 * @param {Object} data
 * @returns
 */
export function bindWechatApi(data) {
  return http({
    url: '/member/social-user/bind',
    method: 'post',
    data: data
  });
}

/**
 * 微信解绑
 * @param {Object} data
 * @returns
 */
export function clearbindWechatApi(data) {
  return http({
    url: '/member/social-user/unbind',
    method: 'post',
    data
  });
}
